package com.jdd.modules.area.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.jdd.modules.area.entity.ChargeRulesModule;
import com.jdd.modules.area.vo.ChargeRulesModuleVO;

import java.util.List;

/**
 * @Description: 停车场计费规则模块表
 * @Author: jdd
 * @Date: 2021-07-13
 * @Version: V1.0
 */
public interface IChargeRulesModuleService extends IService<ChargeRulesModule> {

    /**
     * 查询计费规则模块
     *
     * @param chargeRulesId 计费规则id
     * @return 计费规则模块
     */
    List<ChargeRulesModule> getChargeRulesModule(String chargeRulesId);

    /**
     * 获取下一个计费规则
     *
     * @param chargeRulesModule
     * @return
     */
    ChargeRulesModule getNextChargeRuleModule(ChargeRulesModule chargeRulesModule);

    /**
     * 获取上一个计费规则
     *
     * @param chargeRulesModule
     * @return
     */
    ChargeRulesModule getPrimaryChargeRuleModule(ChargeRulesModule chargeRulesModule);

    /**
     * 清空所有绑定指定计费规则Id的计费规则模块
     *
     * @param chargeRulesId
     * @return
     */
    Boolean removeByChargeRulesId(String chargeRulesId);

    /**
     * 清空表数据
     *
     * @return true 清空成功
     */
    boolean removeAllInfo();


    String add(ChargeRulesModuleVO chargeRulesModuleVO) throws Exception;
    String edit(ChargeRulesModuleVO chargeRulesModuleVO) throws Exception;
    String delete(String chargeRulesModuleId) throws Exception;
}
